
form method = 'get'
  .panel.panel-default
    .panel-heading
      = link_to "新增" , new_order_beauty_path, class: "btn btn-primary btn-xs"

    .panel-body
	  == grid(@tasks_grid, show_filters: :always) do |g|  
	    -g.column name: '工单号', attribute: 'code'
	    -g.column name: '客户姓名', attribute: 'name', assoc: :customer
	    -g.column name: '车牌号', attribute: 'car_num', assoc: :customer
	    -g.column name: '车型', attribute: 'car_mo', assoc: :customer
	    -g.column name: '金额', attribute: 'total'
	    -g.column name: '状态', attribute: 'status'
	    -g.column name: '创建人', attribute: 'name', assoc: :user
	    -g.column name: '创建日期', attribute: 'created_at' do |task| task.created_at.to_s(:db) end
	    -g.column do |c| grid_operator(:order_beauty_path, c.id, do_show=true, do_edit=false, do_delete=true) end  
